package com.ylr.blog.framework.feign.client;

import com.ylr.base.common.tool.Result;
import com.ylr.blog.framework.feign.YbBlogSpaceBaseClient;
import com.ylr.blog.framework.feign.configuration.ClientConfiguration;
import com.ylr.blog.framework.feign.fallback.YbBlogSpaceClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-05-19 21:34:09
 * className: YbBlogSpaceClient
 * version: 1.0
 * description:
 */
@FeignClient(value = "ylr-blog", contextId = "YbBlogSpaceClient", path = "/api/blog-space",
        fallback = YbBlogSpaceClientFallback.class, configuration = ClientConfiguration.class)
public interface YbBlogSpaceClient extends YbBlogSpaceBaseClient {

    /**
     * 添加用户博客空间接口
     * @param userId 用户主键
     * @param name   空间名称
     */
    @PostMapping("/add")
    Result<Object> addBlogSpace(@RequestParam("userId") Long userId, @RequestParam("name") String name);

}
